﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RelatedWordsServiceTestPage.cs" Inherits="RelatedWordsServiceTextPage" %>

<!DOCTYPE html>
<script type="text/javascript">
    function toggleTextbox(rdo) {
        if (rdo.id === "urlCheckbox") {
            document.getElementById("urlTextBox").disabled = !rdo.checked;
            document.getElementById("textCheckbox").disabled = rdo.checked;
        } else if (rdo.id === "textCheckbox") {
            document.getElementById("textTextBox").disabled = !rdo.checked;
            document.getElementById("urlCheckbox").disabled = rdo.checked;
        }
    }
</script>
<html>
<head id="Head1" runat="server">
    <title></title>
    <style type="text/css">
        .auto-style1 {
            height: 23px;
        }

        .auto-style2 {
            height: 23px;
            width: 70px;
        }

        .auto-style3 {
            width: 70px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <h1>Related Words Service Test Page</h1>
        <table style="width: 100%;" border="1">
            <tr>
                <td><b>Service Description</b></td>
                <td>The Related Words Service takes a word in as an input as well as either<wbr /> a
                    <i>string</i> filled with words or a <i>URI</i> identifying a web page<wbr /> which
                    will be parsed of <i>html</i> tags, <i>xml</i> tags and all stop words<wbr />
                     then analyzed for related words. A related word is one that occurrs frequently<wbr /> 
                    near the word of interest or is very close to the word of interest in most<wbr /> 
                    cases. Examples of this include "man" and "moon" as the phrase<wbr /> 
                    "man on the moon" are both shown to be together frequently.
                </td>
            </tr>
            <tr>
                <td><b>Service URL</b></td>
                <td><a href="http://10.0.2.143/RelatedWordsWCFService/Service1.svc">http://10.0.2.143/RelatedWordsWCFService/Service1.svc</a></td>
            </tr>
            <tr>
                <td><b>WSDL URL</b></td>
                <td><a href="http://10.0.2.143/RelatedWordsWCFService/Service1.svc?singleWsdl">http://10.0.2.143/RelatedWordsWCFService/Service1.svc?singleWsdl</a></td>
            </tr>
            <tr>
                <td><b>Methods</b></td>
                <td>Method List. Format: <i>return type :: MethodName(parameter(s))</i>
                    <ul>
                        <li>string[]::getRelatedWordsFromAddress(string word, URI address)</li>
                        <li>string[]::getRelatedWords(string word, string  stuffToLookIn)</li>
                    </ul>
                </td>
            </tr>
        </table>
        <hr />
        <p />
        <h2>Service Test</h2>
        <p>
            Enter Word:&nbsp;&nbsp;&nbsp;
            <asp:TextBox ID="wordToFindTextBox" runat="server"></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="Submit" runat="server" Text="Submit" OnClick="Submit_Click" />
        </p>
        <p><b>AND</b></p>
        <table style="width: 66%;" border="0">
            <tr>
                <td class="auto-style2">
                    <input type="checkbox" id="urlCheckbox" onclick="toggleTextbox(this)" checked="checked" runat="server" />URL</td>
                <td class="auto-style1">
                    <asp:TextBox ID="urlTextBox" runat="server" Width="454px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="auto-style3">
                    <input type="checkbox" id="textCheckbox" onclick="toggleTextbox(this)" disabled="true" runat="server"/>Text</td>
                <td>
                    <asp:TextBox ID="textTextBox" runat="server" Height="60px" Width="453px" Enabled="False"></asp:TextBox>
                </td>
            </tr>
        </table>
        <br />
        <p id="output" runat="server">
            Output:&nbsp&nbsp&nbsp
        </p>
    </form>
</body>
</html>
